package my.study.org.apache.commons.pool;

import org.apache.commons.pool.impl.GenericObjectPool;

public class Ex01 {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		GenericObjectPool pool = new GenericObjectPool(new ServicePoolableObjectFactory());
		Integer in1 = (Integer) pool.borrowObject();
		System.out.println(in1);
		Integer in2 = (Integer) pool.borrowObject();
		System.out.println(in2);
		System.out.println(pool.getNumActive());
	}

}
